<?php
/**
 * Created by PhpStorm.
 * User: xiao
 * Date: 2017/6/14
 * Time: 下午3:52
 */

namespace app\domain;


use app\src\invite\action\InviteCodeAction;

class InviteCodeDomain extends BaseDomain
{
    public function getCode()
    {
        $this->checkVersion('100');
        $code_type = $this->_post('code_type', '',' code_type need');
        $account_id = $this->_post('account_id', '', 'account_id need');

        $result = (new InviteCodeAction)->getInviteCode($code_type, $account_id);

        $this->exitWhenError($result);

        $this->apiReturnSuc($result['info']);
    }
}